module MonitorEntriesHelper
  def get_log_class_desc log_class
    case log_class
      when MonitorEntry.EMPTY_ENTRY
        "N/A"
      when MonitorEntry.BATTERY_ENTRY
        "BATTERY"
      when MonitorEntry.CONNECTIVITY_ENTRY
        "CONNECTIVITY"
      when MonitorEntry.OS_ENTRY
        "OS"
      else
        log_class
    end
  end

  def get_status_desc_for_battery status
    case status
      when MonitorEntry.EMPTY_ENTRY
        "N/A"
      when MonitorEntry.POWER_DISCONNECTED
        "POWER DISCONNECTED"
      when MonitorEntry.POWER_CONNECTED
        "POWER CONNECTED"
      else
        status
    end
  end

  def get_status_desc_for_connectivity status
    case status
      when MonitorEntry.EMPTY_ENTRY
        "N/A"
      when MonitorEntry.NET_DISCONNECTED
        "NET DISCONNECTED"
      when MonitorEntry.NET_CONNECTED
        "NET CONNECTED"
      else
        status
    end
  end
  
  def get_status_desc_for_os status
    case status
      when MonitorEntry.EMPTY_ENTRY
        "N/A"
      when MonitorEntry.OS_SHUTDOWN
        "SHUTDOWN"
      when MonitorEntry.OS_BOOT
        "BOOT"
      else
        status
    end
  end

  def get_type_desc_for_battery type
    case type
      when MonitorEntry.EMPTY_ENTRY
        "N/A"
      when 0
        "UNPLUGGED"
      when 1
        "AC"
      when 2
        "USB"
      when 4
        "WIRELESS"
      else
        type
    end
  end

  def get_type_desc_for_connectivity type
    case type
      when MonitorEntry.EMPTY_ENTRY
        "N/A"
      when 0
        "MOBILE"
      when 1
        "WIFI"
      when 2
        "MOBILE_MMS"
      when 3
        "MOBILE_SUPL"
      when 4
        "MOBILE_DUN "
      when 5
        "MOBILE_HIPRI "
      when 6
        "WIMAX"
      when 7
        "BLUETOOTH"
      when 8
        "DUMMY"
      when 9
        "ETHERNET"
      else
        type
    end
  end
end